<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>线图</title>
  <script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
  <script src="https://lib.baomitu.com/echarts/4.2.0-rc.2/echarts.min.js"></script>
</head>
<body>
	<div id="mainThree" style="width: 100%; height: 400px;"></div>
	<script type="text/javascript">
		
		function findAllThree() {

			var url = "../../cartogram/findXianAll.action";
			var data = {
					"year" :$("#year").val()
				};
			$.post(url, data, function(mes) {
				findcartogramThree(mes);
			}, "json");
		}

		function findcartogramThree(mes) {
			// 基于准备好的dom，初始化echarts实例
			var myChart = echarts.init(document.getElementById('mainThree'));
			option = {
				    title: {
				        text: ''+$("#year").val()+'销售总金额统计'
				        ,x : 'center'
				    },
				    tooltip : {
				        trigger: 'axis',
				        axisPointer: {
				            type: 'cross',
				            label: {
				                backgroundColor: '#6a7985'
				            }
				        }
				    },
				    legend: {
				    	top:'35',
				        data:['销售总金额','销售成本']
				    },
				    grid: {
				        left: '3%',
				        right: '4%',
				        bottom: '3%',
				        containLabel: true
				    },
				    xAxis : [
				        {
				            type : 'category',
				            boundaryGap : false,
				            data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
				        }
				    ],
				    yAxis : [
				        {
				            type : 'value'
				        }
				    ],
				    series :mes
				};


			// 使用刚指定的配置项和数据显示图表。
			myChart.setOption(option);
		}
	</script>
</body>
</html>